from django.conf.urls import patterns, include,url
import os
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$','metalpollution.views.homepage'),
    url(r'^data-manage/$','metalpollution.views.MetalAdd'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^login/$','metalpollution.views.login'),
    url(r'^loginValidate/$','metalpollution.views.loginValidate'),
    url(r'^add_btn_submit/$','metalpollution.views.add_btn_submit'),
    url(r'^data-statistics/$','metalpollution.views.metal_statistics'),
    url(r'^data-export/$','metalpollution.views.metal_export'),
    url(r'^metal_delete/(.+)/$','metalpollution.views.delete_metal'),
    url(r'^metal_detail/(.+)/$','metalpollution.views.metal_detail'),
    url(r'^metal_modify/(.+)/$','metalpollution.views.metal_modify'),
    url(r'^metal_update_btn/$','metalpollution.views.metal_update_btn'),
    url(r'^filter/(.+)/$','metalpollution.views.filter_metal'),

    url(r'^dataStatistic/$', 'metalpollution.views.statistic'),
    url(r'^statistic_outPut/$', 'metalpollution.views.exportExcel'),



    url(r'^medias/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root':
             os.path.join(os.path.dirname(__file__),'medias/').replace('\\','/')
        }),
)
